#!/usr/bin/env python3
# coding: utf-8

import re


def rev(var):
    preserve_type = type(var)
    var = str(var)
    var = ''.join(sorted(var, reverse=True))
    var = preserve_type(var)
    return var


if __name__ == "__main__":
    print('rev(\'abc\') =', rev('abc'))
